﻿using MagicWorld.DDD.Domain.Entity;
using MagicWorld.DDD.Domain.Types;

namespace MagicWorld.DDD.Domain.Service.Impl
{
    /// <summary>
    /// 战士装备策略
    /// </summary>
    public class FighterEquipmentPolicy : IEquipmentPolicy
    {
        public bool CanApply(Player player, Weapon weapon)
        {
            return player.PlayerClass == PlayerClass.Fighter;
        }

        /// <summary>
        /// Fighter 能装备 Sword 和 Dagger
        /// </summary>
        /// <param name="player"></param>
        /// <param name="weapon"></param>
        /// <returns></returns>
        public bool CanEquip(Player player, Weapon weapon)
        {
            return weapon.WeaponType == WeaponType.Sword
         || weapon.WeaponType == WeaponType.Dagger;
        }
    }
}